﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Light
{
    /// <summary>
    /// 客户端负责与服务器通讯，接收服务端的路灯设置指令来设置路灯的状态。
    /// 同时，服务端可以查看客户端的路况，也就是说服务器可以看到客户端的road
    /// </summary>
    class Client
    {
        public Road road;

        public Client( Road r )
        {
            Init();
            road = r;
        }

        public void Init()
        {
        }

        public void Update()
        {
            List<TrafficLight> lights = road.LightList;
            TrafficLight light0 = lights[ 0 ];
            TrafficLight light1 = lights[ 1 ];
            TrafficLight light2 = lights[ 2 ];
            TrafficLight light3 = lights[ 3 ];

            // 根据服务器指令更新灯状态

        }


    }
}
